import 'package:flutter/material.dart';
import 'package:ost_flutter_module/common/adapt.dart';
import 'package:ost_flutter_module/common/color.dart';
import 'package:ost_flutter_module/common/utils.dart';

class LoadingEmptyWidget extends StatelessWidget {
  final Color backgroundColor;
  final String text;

  const LoadingEmptyWidget(
      {Key key, this.backgroundColor = Colors.white, this.text})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: backgroundColor,
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Utils.svgAssets('empty'),
            SizedBox(height: 12.0),
            Text(
              text ?? "暂无数据",
              style: TextStyle(color: color666666, fontSize: 16.0),
            ),
            SizedBox(height: 80),
          ],
        ),
      ),
    );
  }
}
